package cn.wolfcode.crm.mapper;


import cn.wolfcode.crm.domain.Product;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Product record);

    Product selectByPrimaryKey(Long id);

    List<Product> selectAll();

    int updateByPrimaryKey(Product record);

	int queryForCount(QueryObject qo);

    List<Product> queryForList(QueryObject qo);

	void updateByTemOrder(Product product);

    void saveBillAndProductRelation(@Param("snNumber")Long snNumber, @Param("id")Long id);
    /**
     * @Description: 保存保单和产品的关系
     * @Param: [snNumber, id] 传入的保单id和产品id
     * @return: void
     */

    List<Product> selectProductListByBillNumber(Long number);
    /**
     * @Description: 通过保单编号查询产品信息
     * @Param: [id] 传入的保单id
     * @return: java.util.List<cn.wolfcode.crm.domain.Product>
     */

    void deleteBillAndProductRelation(Long number);
    /**
     * @Description: 删除保单和产品的关系
     * @Param: [number] 传入的保单编号
     * @return: void
     */

    Product selectPIdByBillNumber(Long snNumber);
    /**
     * @Description: 查询产品id
     * @Param: [aLong] 通过保单编码查询当前产品
     * @return: cn.wolfcode.crm.domain.Product
     */


}